Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Add the ability to set font family, weight, size, and style from RN #114

Merged

Conversation

daniloercoli
Copy link
Contributor

@daniloercoli daniloercoli commented Jan 22, 2019

This PR adds the ability to set font family, weight, size, and style from RN.

Setting the proper font Family is required by our parent app, and there is no reliable way to set them in CSS/Style. We've then decided to follow the approach suggest by RN docs, and checked the default React Native TextInput component.

All of the code in this PR is taken from ReactTextInputManager class.

Before start using it in wordpress-mobile/gutenberg-mobile#450 we need the same properties added to iOS.

To test it, just apply this GIST https://gist.github.com/daniloercoli/11f917e4cf1ee046875edbc843d9e85a to your local copy of GB and run the app as usual.

Copy link
Contributor

@mzorz mzorz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested by copying all the changes on WPAndroid's develop. Works well, but this will need to be moved to the main gutenberg-mobile repo as discussed.

LGTM!

@daniloercoli daniloercoli merged commit 4a84c82 into master Jan 23, 2019
@daniloercoli daniloercoli deleted the add/ability-to-change-font-family-weight-style-from-RN branch January 23, 2019 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants